package com.service.impl;

import com.bean.Sales;
import com.dao.SalesMapper;
import com.service.SalesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 用户业务逻辑实现
 */
@Service
public class SalesServiceImpl implements SalesService {

    @Autowired
    private SalesMapper salesMapper;

    @Override
    public int save(Sales sales) {
        return salesMapper.insert(sales);
    }

    @Override
    public int remove(Sales sales) {
        return salesMapper.delete(sales);
    }

    @Override
    public int modify(Sales sales) {
        return salesMapper.update(sales);
    }

    @Override
    public List<Sales> find(Sales sales) {
        return salesMapper.select(sales);
    }

    @Override
    public int count(Map<String, Object> map) {
        return salesMapper.selectCount(map);
    }

    @Override
    public List<Sales> query(Map<String, Object> map) {
        return salesMapper.selectByPage(map);
    }
}
